package com.kwok.rbac.application.service.impl;

import com.kwok.rbac.application.common.utils.R;
import com.kwok.rbac.application.mapper.AuthorizationMapper;
import com.kwok.rbac.application.service.AuthorizationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AuthorizationServiceImpl implements AuthorizationService {

    @Autowired
    private AuthorizationMapper authorizationMapper;

    @Override
    public Boolean privilegeToRole(Integer roleId, List<Integer> privilegeIdList) {
        Integer integer = authorizationMapper.privilegeToRole(roleId, privilegeIdList);
        return integer >= 1;
    }

}
